// samsting : this file is auto create.

#include "R-kvstore/2015-01-01/DescribePriceResponse.h"

namespace aliyun { namespace R_kvstore {

DescribePriceResponse::DescribePriceResponse() {
}

int64 DescribePriceResponse::Rule::GetRuleDescId(void) const {
  return RuleDescId_;
}

const string& DescribePriceResponse::Rule::GetName(void) const {
  return Name_;
}

const string& DescribePriceResponse::Rule::GetTitle(void) const {
  return Title_;
}

const std::vector<RuleId>& DescribePriceResponse::Order::GetRuleIds(void) const {
  return RuleIds_;
}

float DescribePriceResponse::Order::GetOriginalAmount(void) const {
  return OriginalAmount_;
}

float DescribePriceResponse::Order::GetTradeAmount(void) const {
  return TradeAmount_;
}

float DescribePriceResponse::Order::GetDiscountAmount(void) const {
  return DiscountAmount_;
}

const std::vector<DescribePriceResponse::Rule>& DescribePriceResponse::GetRules(void) const {
  return Rules_;
}

const DescribePriceResponse::Order& DescribePriceResponse::GetOrder(void) const {
  return Order_;
}

const char* DescribePriceResponse::BaseKey(void) {
  return "DescribePriceResponse";
}

void DescribePriceResponse::UnmarshallerMap(std::map<string, string>& response_map) {
  int Rules__length = 0;
  UnmarshallerInt(Rules__length, response_map, "DescribePriceResponse.Rules.Length");
  if(Rules__length >= 0) {
    Rules_.resize(Rules__length);
    for(int i1 = 0; i1 < Rules__length; i1++) {
      UnmarshallerInt64(Rules_[i1].RuleDescId_, response_map, "DescribePriceResponse.Rules["+string_ValueOfInt(i1)+"].RuleDescId");
      UnmarshallerString(Rules_[i1].Name_, response_map, "DescribePriceResponse.Rules["+string_ValueOfInt(i1)+"].Name");
      UnmarshallerString(Rules_[i1].Title_, response_map, "DescribePriceResponse.Rules["+string_ValueOfInt(i1)+"].Title");
    } // for(int i1 = 0; i1 < Rules__length; i1++) {
  } // if(Rules__length >= 0) {

    int Order__RuleIds__length = 0;
    UnmarshallerInt(Order__RuleIds__length, response_map, "DescribePriceResponse.Order.RuleIds.Length");
    if(Order__RuleIds__length >= 0) {
      Order_.RuleIds_.resize(Order__RuleIds__length);
      for(int i2 = 0; i2 < Order__RuleIds__length; i2++) {
        UnmarshallerString(Order_.RuleIds_[i2], response_map, "DescribePriceResponse.Order.RuleIds["+string_ValueOfInt(i2)+"]");
      } // for(int i2 = 0; i2 < Order__RuleIds__length; i2++) {
    } // if(Order__RuleIds__length >= 0) {

    UnmarshallerFloat(Order_.OriginalAmount_, response_map, "DescribePriceResponse.Order.OriginalAmount");
    UnmarshallerFloat(Order_.TradeAmount_, response_map, "DescribePriceResponse.Order.TradeAmount");
    UnmarshallerFloat(Order_.DiscountAmount_, response_map, "DescribePriceResponse.Order.DiscountAmount");
}


} } // namespace aliyun { namespace R_kvstore {

// end of file 
